package com.epam.kozich.Service;

import com.epam.kozich.dao.BookDAO;
import com.epam.kozich.dao.PersonDAO;
import com.epam.kozich.model.*;

public class ServiceImpl implements Service{

	BookDAO bookDAO;
	PersonDAO personDAO;
	@Override
	public void addNewPerson(Person person) {
		personDAO.addPerson(person);
		
	}

	@Override
	public void changeBook(Book book) {
		bookDAO.updateBook(book);
		
	}

	@Override
	public void deleteBook(Book book) {
		bookDAO.deleteBook(book);
		
	}

	@Override
	public void deletePerson(Person person) {
		personDAO.deletePerson(person);
		
	}

	@Override
	public void printBannedPerson() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void printBook() {
		bookDAO.getAllBooks();
		
	}

	@Override
	public void printOrderforPerson(Long id) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void printPerson() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void saveNewBook(Book book) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void bannedPerson(Person person) {
		person.setBanned(true);
		personDAO.updatePerson(person);
		
	}

}
